package com.adprof.demo.natives.viewholders;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.recyclerview.widget.RecyclerView;

import com.adprof.demo.android.R;

/**
 * 新闻内容ViewHolder - 用于展示新闻内容
 * 同时支持RecyclerView和ListView
 */
public class NewsViewHolder extends RecyclerView.ViewHolder {
    public TextView newsTitle, newsSummary, sourceText, timeText;
    public ImageView newsImage;

    public NewsViewHolder(View itemView) {
        super(itemView);
        newsTitle = itemView.findViewById(R.id.news_title);
        newsSummary = itemView.findViewById(R.id.news_summary);
        sourceText = itemView.findViewById(R.id.source_text);
        timeText = itemView.findViewById(R.id.time_text);
        newsImage = itemView.findViewById(R.id.news_image);
    }
}
